#define SIGN_BIT_MASK 0x80000000
#define OVER_BIT_MASK 0x40000000

//   A31         A30       A29 ...... A0
// sign bit  overflow bit    data bits
// Here I choose Int(32 bits) to simulate the word in the mixal.
// The byte in the mixal is represented by 6 bits, therefore the low 30 bits 
// in the Int contains 5 bytes in the mixal. 
// The highest bit in the Int is used to represent the sign of the word in the 
// mixal as we usually do in the 2's complement.
// The 30th bit in the Int (count from lowest to highest, start at zero) is
// considered as the overflow flag bit to check whether the computation has
// overflowed.
// The low 30 bit is stored in the true form, and the computation only involves
// the low 30 bit except overflow.
// If we want to change the sign of the word in the mixal, we just change the 
// highest bit in the Int while other bits never change.
 

int neg(int word);
int abso(int word);
int clr(int word);
int add(int wordA, int wordB);
int sub(int wordA, int wordB);
long long imul(int wordA, int wordB);
long long idiv(int wordA, int wordX, int wordB);
int shl(int word, int count);
int shr(int word, int count);

int store(int content, int field, int word);
